package anbook.dao;

import java.util.List;

import anbook.dto.Friend;
import anbook.dto.Friends_request;

public interface IFriendDAO {
	//ģ���߰��� insertFriend �޼ҵ� 2�� ȣ��. 
	//�̴� Control���� ���� 
	void insertFriend(Friend friend);
	//ģ�������� deleteFriend �޼ҵ� 2�� ȣ�� �Ұ�
	//�̴� Control���� ���� 
	void deleteFriend(Friend friend);
	boolean checkFriend(Friend friend);
	void insertFriendRequest(Friends_request request);
	void deleteFriendRequest(Friends_request request);
	boolean checkFriendRequest(Friends_request request);
	List<Friends_request> getFriendsRequestList(String email);
	
	public static final String SQL_INSERT_FRIEND = "insert into friends values(?,?)";
	public static final String SQL_DELETE_FRIEND = "delete from friends where me_email = ? and friend_email = ?";
	public static final String SQL_GET_FRIEND = "select * from friends where me_email=? and friend_email=?";
	
	public static final String SQL_GET_FRIENDREQUEST_LIST = "select * from friends_request where friend_email = ?";
	public static final String SQL_GET_FRIENDREQUEST = "select * from friends_request where request_email=? and friend_email=?";
	public static final String SQL_INSERT_FRIENDREQUEST = "insert into friends_request values(?,?)";
	public static final String SQL_DELETE_FRIENDREQUEST = "delete from friends_request where request_email = ? and friend_email = ?";
}
